﻿
@{
    ViewBag.Title = "GanttChart";
}
<link href="/Resource/jqtree/TreeGrid.css" rel="stylesheet" />
<link href="~/Resource/css/gartt.css" rel="stylesheet" />
<link href="~/Resource/css/prettify.min.css" rel="stylesheet" />
<style>
    .container {
        display: flex;
        padding: 0;
    }

        .container > div:nth-child(1) {
            flex: 7;
        }

        .container > div:nth-child(2) {
            flex: 3;
        }

        .container > div img {
            width: 100%;
            height: 100%;
        }

</style>

<div class="contentData">
    <div>
        <div class="gantt_ot">
            <div class="gantt"></div>
        </div>
    </div>
</div>

<script src="/Resource/scripts/jquery-1.10.2.js"></script>
<script src="/Resource/jqtree/TreeGrid.js"></script>
<script src="~/Resource/scripts/jquery.fn.gantt.js" charset="utf-8"></script>
<script src="~/Resource/scripts/prettify.min.js"></script>
<script>
    $(function () {
        "use strict";
        $.get('/plan/GetGantt',
            {id :'1032785930504769536'},
            function(result) {
                if (result.Flag == true) {
                    //初始化gantt
                    $(".gantt").gantt({
                        source:result.Data,
                        navigate: 'scroll',//buttons  scroll
                        scale: "days",// months  weeks days  hours
                        maxScale: "months",
                        minScale: "days",
                        itemsPerPage: 10000
                    });
                }
            }, 'json');

    });


</script>











